home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
ATCP_sdk_40_gc.lha
/
AmiTCP-4.0-gcc
/
src
/
netlib
/
setegid.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-28
|
725b
|
33 lines
static const char *RCS="$Id: setegid.c,v 4.1 1994/09/29 23:09:02 jraja Exp $";
/*
* setegid() - set effective group
*
* Copyright © 1994 AmiTCP/IP Group,
* Network Solutions Development Inc.
* All rights reserved.
*/
#include <sys/types.h>
#include <unistd.h>
extern struct Library *UserGroupBase;
extern __inline int
setregid (int real,int eff)
{
register int _res __asm("d0");
register struct Library * a6 __asm("a6") = UserGroupBase;
register int d0 __asm("d0") = real;
register int d1 __asm("d1") = eff;
__asm __volatile ("jsr a6@(-0x54)"
: "=r" (_res)
: "r" (a6), "r" (d0), "r" (d1)
: "a0","a1","d0","d1", "memory");
return _res;
}
int setegid(gid_t g)
{
return setregid(-1, g);
}